uniform mat4 uMatrix;
uniform vec2 uScreenSize;

attribute vec3 aPosition;
attribute vec2 aPointSizeColor;

varying vec2 vCenter;
varying float vRadius;
varying float alpha;

void main() {
    vec4 t = uMatrix * vec4((aPosition.y+aPosition.z)*sin(aPosition.x),(aPosition.y+aPosition.z)*cos(aPosition.x), 0.0, 1.0);
    gl_PointSize = aPointSizeColor.x + 2.0; // 1 is antialise width
    gl_Position = t;
    vCenter = vec2((t.x / t.w + 1.0) * uScreenSize.x / 2.0, (t.y / t.w + 1.0) * uScreenSize.y / 2.0);
    vRadius = aPointSizeColor.x / 2.0;
    alpha=aPointSizeColor.y;
}
